<%@page import="itsm.isperp.framework.core.context.ContextHolder"%><%@ page
	language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = ContextHolder.getWebServerName(request);
%>

<div data-role="header" data-position="inline"
	class="ui-header ui-bar-a" role="banner">
	<h1 class="ui-title" role="heading" aria-level="1">3.帐号设定</h1>
</div>
<div data-role="content" class="ui-content" role="main">

	<form id="registerForm" method="post"
		action="<%=basePath%>api/wechat/setting/save">
		<input type="hidden" name="openid" value="${openid}" /> <input
			type="hidden" name="registerType" value="2" /> <input type="hidden"
			name="id" value="${id }" /><input type="hidden" name="name"
			value="${name}" />
		<div class="box">
			<c:if test="${result eq 2 }">
				<div data-role="content" class="ui-content" role="main">
					<img style="width:40%"
						src="<%=basePath%>img/wechat/disappointed.jpg">
					<h3 class="ui-title" role="heading" aria-level="1">帐号以存在，请重新输入！</h3>
				</div>

			</c:if>
			<div class="input-row">
				<label>帐号名</label>
			</div>


			<div>
				<input type="text" value="${accountId }" name="accountId"
					placeholder="请输入帐号" class="required">
			</div>

			<div class="input-row">
				<label>密码</label>
			</div>
			<div>
				<input id="password" type="password" name="password"
					placeholder="请输入密码" class="required">
			</div>

			<div class="input-row">
				<label>重新输入密码</label>
			</div>
			<div>
				<input id="password2" type="password" name="password2"
					placeholder="请输入输入密码" class="required">
			</div>

			<div>
				<button class="nui-mainbtn" type="submit"
					onclick="javascript:return beformSubmit();">提交</button>
	</form>

</div>
<script type="text/javascript">
	function beformSubmit() {

		if ($("#password").val() != $("#password2").val()) {
			alert("两次密码输入不一致！");
			$("#password").val("");
			$("#password2").val("");
			return false;
		}
		return $("#registerForm").valid();

	}
</script>